/******************************************************************************/
enum SLOT_TYPE // inventory item slot
{
   SLOT_HEAD    , // head         slot for helmet
   SLOT_NECK    , // neck         slot for amulet/necklace
   SLOT_ARM_L   , // left  arm    slot for weapon/shield/ammo
   SLOT_ARM_R   , // right arm    slot for weapon/shield/ammo
   SLOT_BODY    , // body         slot for armor/clothing
   SLOT_HANDS   , // hands        slot for gloves
   SLOT_LEGS    , // legs         slot for pants
   SLOT_FEET    , // feet         slot for shoes
   SLOT_FINGER_L, // left  finger slot for ring
   SLOT_FINGER_R, // right finger slot for ring
   SLOT_TEMP    , // temporary    slot (current item moved with mouse cursor)
   SLOT_NUM     , // number of slots
};
/******************************************************************************/
struct NetInventory // net inventory
{
   Memc<NetItem> items;
   Int           slots[SLOT_NUM]; // each array value represents a slot, and is equal to index of item in 'items' container or -1 if slot doesn't have an item

   // manage
   void del();

   // get
   Bool valid(Int slot) {return InRange(slot, T.slots) && InRange(T.slots[slot], items);} // if 'slot' points to a valid item

   // network
   void   compress(File &f, Bool equipped_only=false); //   compress data so it can be sent  using network connection
   void decompress(File &f                          ); // decompress data from data obtained using network connection

   // io
   void save(File &f); // save item to   file
   Bool load(File &f); // load item from file, false on fail

   NetInventory();
};
/******************************************************************************/
